/**
 * 
 */
package jp.co.wap.exam;

import java.util.*;

import jp.co.wap.exam.lib.*;
/**
 * @author pratibind_jha
 *
 */
public class DriverProblem1 {
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		/*Problem1 p = new Problem1();
		Problem2 p1 = new Problem2();
		// example: Figure 1
		Interval interval1 = new Interval("08:00", "12:00");
		Interval interval2 = new Interval("06:00", "09:00");
		Interval interval3 = new Interval("11:00", "13:30");
		List<Interval> figure1 = Arrays.asList(interval1, interval2, interval3);
		//assertThat(p.getMaxIntervalOverlapCount(figure1), is(2));
		//System.out.println("for interval1: "+ p.getMaxIntervalOverlapCount(figure1));
	
		// example: Figure 2
		List<Interval> figure2 = Arrays.asList(new Interval("09:00", "12:30"),
		new Interval("06:00", "09:30"), new Interval("12:00", "14:30"),
		new Interval("10:00", "10:30"), new Interval("11:00", "13:30"));
		//assertThat(p.getMaxIntervalOverlapCount(figure2), is(3));
		
		//example: figure 3
		List<Interval> figure3 = Arrays.asList(new Interval("06:00","08:30"),
				new Interval("08:00","09:00"),new Interval("09:00","11:00"),
				new Interval("09:00","11:30"),new Interval("10:30","14:00"),
				new Interval("12:30","14:00"));
		
		//Test cases for problem1
		System.out.println("Problem1: Count overLap");
		System.out.println("for interval1: "+ p.getMaxIntervalOverlapCount(figure1));
		System.out.println("for interval2: "+ p.getMaxIntervalOverlapCount(figure2));
		System.out.println("for interval3: "+ p.getMaxIntervalOverlapCount(figure3));
		
		//Test cases for Problem2
		System.out.println("Problem2: Maximum time worked");
		System.out.println("for interval1: "+ p1.getMaxWorkingTime(figure1));
		System.out.println("for interval2: "+ p1.getMaxWorkingTime(figure2));
		System.out.println("for interval3: "+ p1.getMaxWorkingTime(figure3));
		
		*/
		/**
		 * @Driver Program for Examination 2
		 */
		
		
		
		PersistentQueue<Integer> psq = new PersistentQueue<Integer>();
		PersistentQueue<Integer> psq1=null;
		double t1 = System.currentTimeMillis();
		
		for(int i=0;i<10000;i++){
			psq = psq.enqueue(new Integer(i));
		}
		
		System.out.println("Time take Enqueu: " + (System.currentTimeMillis()-t1));
		
		//measure the time taken in executing the Dequeue
		t1 = System.currentTimeMillis();
		
		System.out.println("Size of Queue "+ psq.size());
		for(int i=0;i<100;i++){
				psq = psq.dequeue();
		}
		
		System.out.println("Time take Dequue: " + (System.currentTimeMillis()-t1));
	
	}
}
